{%extends "base.xhtml"%}
{% load i18n %}
{% load ham %}
{%block content%}
	<h2>{%trans "Add test"%}</h2>
	{% if form.has_errors %}
	{%trans "Correct following errors"%}
	{%endif%}

	<form method="post" action="{%href ""%}" enctype="multipart/form-data">
	<p>
		<label for="id_problem">{%trans "Problem Id"%}</label>
		{{ form.problem }}
        	{% if form.problem.errors %}*** {{ form.problem.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_name">{%trans "Test Filename"%}</label>
		{{ form.name }}
        	{% if form.name.errors %}*** {{ form.name.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_maxTime">{%trans "Maximum running time (miliseconds)"%}</label>
		{{ form.maxTime }}
        	{% if form.maxTime.errors %}*** {{ form.maxTime.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_maxMem">{%trans "Memory limit (kilobytes)"%}</label>
		{{ form.maxMem }}
        	{% if form.maxMem.errors %}*** {{ form.maxMem.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_input">{%trans "Input file"%}</label>
		{{ form.input }}
        	{% if form.input.errors %}*** {{ form.input.errors|join:", " }}{% endif %}
	</p>
	<p>
		<label for="id_output">{%trans "Output file"%}</label>
		{{ form.output }}
        	{% if form.output.errors %}*** {{ form.output.errors|join:", " }}{% endif %}
	</p>
	<input type="submit" value="{%trans "Add test"%}"/>
	</form>
{%endblock%}

